<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var arr = [1, 2, 3,'a','b','c'];
        var a = arr.pop();
        // console.log(arr);
        // console.log(a);

        var arr2 = [];
        console.log(arr2.pop());
        
        
        /*
            pop 用于删除数组中最后的一位元素
                返回被删除的这个元素,用在一个空数组上，返回值会是undefined
        */
    </script>
</body>
</html>